package com.qm.qmzs.util;

import cn.hutool.core.lang.Dict;
import cn.hutool.setting.yaml.YamlUtil;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zpc
 * @version 1.0
 * @description 把请求头转map
 * @create 2022/4/13 16:27
 */
public class DictToMapUtil {

    public static Map toMap(String path){
        Map map = new HashMap<>(16);
        Dict dict = YamlUtil.loadByPath(path);
        dict.forEach((k,v)->{
            map.put(k,v);
        });
        return map;
    }

}
